<?php
ini_set('display_errors',true);
error_reporting(1);
if(isset ($_GET['button'])){
  
$conexion=oci_connect("caridad","caridad","localhost/xe","AL32UTF8");   

$sql_inserta="INSERT INTO USUARIO(
  id_usuario,
  nombre,
  apellido_p,
  apellido_m,
  direccion,
  telefono,
  contrasena,
  fecha_nac,
  sexo,
  estado_civil,
  e_mail,
  curp,
  id_nivel_usu,
  id_area

) values('".$_GET['id_usuario']."', '".$_GET['nombre']."', '".$_GET['paterno']."', '".$_GET['materno']."',','".$_GET['correo']."','".$_GET['estado']."','".$_GET['municipio']."','".$_GET['colonia']."','".$_GET['codigo_postal']."')";

  $result=oci_parse($conexion, $sql_inserta);
  oci_execute($result);
//echo $sql_inserta;
//  if (!$result)
//    echo oci_last_error($connection);
//  else
//    echo "Registro insertado con exito";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>


    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Usuarios</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/simple-sidebar.css" rel="stylesheet">

    <script type="text/javascript" language="javascript" src="js/ajax.js"></script> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
</head>
<body>
  
<!-- Page Content -->
        <div id="page-content-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                         <!-- Main component -->
      <div class="panel panel-default">
          <!-- Default panel contents -->
        <div class="panel-heading">
             <h2 align="center" >Datos Generales del Usuario</h2>
          <form align="center" class="form-horizontal" name="frmRol" role="form" method="post" action="rol/nuevorol.php" >
            <div  class="row">
                <br/>
           
                <div class="col-xs-2">
                   Clave del Usuario<input align="center" type="text" id="id_usuario" name="id_usuario" class="form-control" placeholder="Clave del Usuario" required="" autofocus="" >
                </div>
            <br/>
            <br/>
            <br/>
            <br/>
                <div class="col-xs-3">
                  Nombre <input align="center" type="text" id="nombre" name="nombre" class="form-control" placeholder="Nombre" required="" autofocus="">
                </div>

                <div class="col-xs-3">
                  Paterno <input type="text" id="paterno" name="paterno" class="form-control" placeholder="Paterno" required="" autofocus="">
                </div>

                <div class="col-xs-3">
                  Materno<input align="center" type="text" id="materno" name="materno" class="form-control" placeholder="Materno"required="" >
                </div>
            <br/>
            <br/>
            <br/>
            <br/>
                <div class="col-xs-5">
                  Correo Electrónico<input  align="center" type="text" id="correo" name="correo" class="form-control" placeholder="Correo Electrónico"required="" >
                </div>
            <br/>
            <br/>
            <br/>
            <br/>
                
                 <div class="col-xs-3">
                    Estado<select class="form-control" id="estado" name="estado"  required="">
                                    <option value="0">Elige</option>
                                 <!--   <?php while (($fila = oci_fetch_array($cat_Rol, OCI_BOTH))){ ?>
                                        <option value="<?php echo $fila['ID']?>"><?php echo $fila['ROL']?></option>
                                    <?php }?>-->
                                                
                                </select>   
                  </div>

                  <div class="col-xs-3">
                    Municipio<select class="form-control" id="municipio" name="municipio"  required="">
                                    <option value="0">Elige</option>
                                 <!--   <?php while (($fila = oci_fetch_array($cat_Rol, OCI_BOTH))){ ?>
                                        <option value="<?php echo $fila['ID']?>"><?php echo $fila['ROL']?></option>
                                    <?php }?>-->
                                                
                                </select>   
                  </div>

                  <div class="col-xs-2">
                    Colonia<select class="form-control" id="colonia" name="colonia"  required="">
                                    <option value="0">Elige</option>
                                 <!--   <?php while (($fila = oci_fetch_array($cat_Rol, OCI_BOTH))){ ?>
                                        <option value="<?php echo $fila['ID']?>"><?php echo $fila['ROL']?></option>
                                    <?php }?>-->
                                                
                                </select>  
                    </div>            
                <div class="col-xs-3">
                  Código Postal<input align="center" type="text" id="codigo_postal" name="codigo_postal" class="form-control" placeholder="Código Postal"required="" >
                </div>

            <br/>
            <br/>
            <br/>
            <br/>
                <div align="center">
                   <input type="hidden" name="registra" value="1" />
                   <input name="button" type="submit" class="botones" id="button" value="Registrar" />
                </div>
            </div>
          </form>
         </div>
        </div> <!--- End Main component -->
                        
                    </div>
                </div>
            </div>
        </div>
        <!-- /#page-content-wrapper -->
        <td>&nbsp;</td>
 
<!-- jQuery Version 1.11.0 -->
    <script src="../js/jquery-1.11.0.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="../js/bootstrap.min.js"></script>

</body>
</html>
